package de.Torgenizer.presentation.Gui.Menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenuBar;

public class MenuController implements ActionListener {
	Menu menu;
	
	public MenuController(){
		menu = new Menu(this);
	}

	public JMenuBar getMenu(){
		return menu;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource() == menu.getMenuItemByLabel("exit")){
			System.exit(0);
		}
		
	}
}
